<template>
  <div class="content-div">
    <div class="card-div">
      <div class="img-div">
        <img src="@/assets/images/陪诊师.png" style="width:100%;" alt="">
        <img src="@/assets/images/当前身份.png" style="right: 0px;width: 54px;position: absolute;" alt="">
      </div>
    </div>
    <div class="gn-btn-box" v-if="userInfo.is_qualification === 0">
      <div class="gn-btn" @click="$router.push('/physicianAuthentication')">立即认证</div>
      <!-- <div class="gn-btn" @click="back()">返回</div>
      <div class="gn-btn1" @click="changeIden()">切换身份</div> -->
    </div>
  </div>
</template>
<script>
import { selectAccompanyingPhysician } from '@/api/medicalWaiter.js'
export default {
  name: 'chooseIdentity',
  data () {
    return {
      userInfo: {}
    }
  },
  computed: {
    accompanying_physician_id () {
      return this.$store.state.user.severUserInfo.accompanying_physician_id
    }
  },
  methods: {
    authentication () { // 认证

    },
    getPhysicianInfo () {
      selectAccompanyingPhysician({ accompanying_physician_id: this.accompanying_physician_id }).then(res => {
        if (res.data.errcode === 0) {
          this.userInfo = res.data.data
          return
        }
        Toast.fail(res.data.errmsg)
      })
    }
  },
  mounted () {
    this.getPhysicianInfo()
  }
}
</script>
<style scoped lang="less">
  .content-div {
    padding: 8px;
    height: calc(100% - 16px);
    font-size: 12px;
    .card-div {
      background-color: #FFFFFF;
      padding-top: 8px;
      height: 100%;
      .img-div {
        position: relative;
        margin: 8px;
        background-color: #f8f8f8;
        border-radius: 8px;
        // img {
        //   width: 100%;
        // }
      }
    }
    background-color: #f2f3f7;
    .gn-btn-box{
      height: 58px;
      position: fixed;
      bottom: 50px;
      left: 0;
      background-color: #FFFFFF;
      width: 100%;
      box-sizing: border-box;
      padding: 10px;
      box-shadow: 0 0 10px 0 #CCCCCC;
      .gn-btn{
        height: 38px;
        line-height: 38px;
        text-align: center;
        background-color: rgba(89,89,255,.07);
        color: #1989fa;
        border-radius: 6px;
        box-sizing: border-box;
        border: 1px solid #1989fa;
      }
      .gn-btn1{
        height: 38px;
        line-height: 38px;
        text-align: center;
        background-color: #1989fa;
        color: #f8f8f8;
        border-radius: 6px;
        box-sizing: border-box;
        width: 63%;
      }
    }
    .flex {
      display: flex;
      flex-direction: row;
      align-items: center;
    }
    .row-center {
      justify-content: center;
    }
    .row-between {
      justify-content: space-between;
    }
  }
</style>
